//
//  EditFoods.h
//  Meal Wheel
//
//  Created by Justin Dell on 7/4/08.
//  Copyright 2008 . All rights reserved.
//

/* Interacts with the GUI to modify the food list */

#import <Cocoa/Cocoa.h>
#import "FoodFetcher.h"


@interface EditFoods : NSObject {
    IBOutlet NSComboBox *addFoodField;
    IBOutlet NSTextField *foodLabel;
    IBOutlet NSButton *addButton;
    IBOutlet NSButton *editButton;
    IBOutlet NSButton *removeButton;
    IBOutlet NSButton *breadButton;
    IBOutlet NSButton *dairyButton;
    IBOutlet NSButton *meatButton;
    IBOutlet NSButton *fruitButton;
    IBOutlet NSButton *veggieButton;
    IBOutlet NSButton *sweetButton;
}

// Initializes the globals used in the editing interface
-(void)initialize;

// Adds a food to the list
-(IBAction)addFood:(id)sender;

// Removes a food from the list
-(IBAction)removeFood:(id)sender;

// Modifies an existing food
-(IBAction)editFood:(id)sender;

// Sets the state of the buttons for an existing food
-(void)setStates:(NSString *)name;

// Functions used for the combo box data source
- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox;
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index;
- (NSString *) firstGenreMatchingPrefix:(NSString *)prefix;
- (NSString *)comboBox:(NSComboBox *)aComboBox completedString:(NSString *)inputString;

@end
